﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DailyComics.Common.Model.Storage
{
  public class Cache : IStorage
  {
    private Dictionary<string, IPersistable> cache = new Dictionary<string, IPersistable>();



    #region IStorage Members

    public void Save(IPersistable obj)
    {
      obj.Put(new CacheStorageStrategy(cache));
    }

    public IPersistable Load(string id)
    {
      IPersistable obj = null; 
      
      obj.Get(new CacheStorageStrategy(cache));

      return obj;
    }

    public bool Contains(string id)
    {
      throw new NotImplementedException();
    }

    #endregion
  }
}
